Skip to content

[RFC] ipc: pm_state_set/get commands added - #949

Closed
lbetlej wants to merge 1 commit into
thesofproject:masterfrom
lbetlej:pm-state-set-def
Closed

lbetlej wants to merge 1 commit into
thesofproject:masterfrom
lbetlej:pm-state-set-def

Conversation

@lbetlej

@lbetlej lbetlej commented Feb 1, 2019 •

Copy link
Copy Markdown
Collaborator

The commit extends IPC interface between a driver and FW to support
new power flows to be used with keyword detection feature. A new
command is added to set request for power state transition request
explicitly & definition of D0ix in addtion to D0 , D3 states is added.

Change to use registers instead of shared memory for cavs specific power
flow will be covered by a separate PR. CHT specific linking issue is tracked as #1330

Signed-off-by: Lech Betlej lech.betlej@linux.intel.com

Comment thread src/include/sof/ipc.h Resolved
Comment thread src/include/uapi/ipc/header.h Resolved
Comment thread src/include/sof/ipc.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this come from host -> DSP ? Wondering if flags would be better as we may permit/deny other operations in the future (not just audio streams) ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the structure just to include only generic fields to disable certain power optimizations. FW will be checking if only pipelines related to keyword detection feature are running (no active streaming to host effectively) and then will opt in for Low Power Sequence (LPS) flow.

Comment thread src/include/sof/ipc.h Outdated

@ranj063 ranj063 Feb 1, 2019 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lbetlej what this intentional? it doesnt seem related to this PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted the change, this can be cleaned up in another PR

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments below. some points aren't clear on what the kernel needs to pass over IPC.

Comment thread src/include/sof/ipc.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit-pick: is this a state or a transition?

Comment thread src/include/sof/ipc.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't get the last two fields. If you set D3 but prevent power gating, this is not D3...
How would the kernel set these two values, based on what?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added diagrams to better illustrate the idea at https://github.com/orgs/thesofproject/teams/sof-developers/discussions/ Could we switch there for a discussion ?

Comment thread src/include/uapi/ipc/header.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this deprecate PM_CTX_SAVE/RESTORE then?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now PM_CTX_SAVE/RESTORE would be backward compatible to for D3 entry transition effectively, mid-term they would become deprecated
Could we switch to https://github.com/orgs/thesofproject/teams/sof-developers/discussions/ for a discussion on pm flows ?

@mmaka1 mmaka1 changed the title ipc: pm_state_set command added, ctx_save/ctx_restore implementation … [WIP] ipc: pm_state_set command added, ctx_save/ctx_restore implementation … Mar 1, 2019
@lbetlej
lbetlej requested a review from a team as a code owner April 26, 2019 08:24
The commit extends IPC interface between a driver and FW to support
new power flows to be used with keyword detection feature. A new
command is added to set request for power state transition request
explicitly & definition of D0ix in addtion to D0 , D3 states is added.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
@lbetlej lbetlej added the ABI ABI change involved label Apr 26, 2019

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need some sync with ABI minor version, as the kernel and FW still have a remaining ABI minor diff to align on.

@lbetlej lbetlej changed the title [WIP] ipc: pm_state_set command added, ctx_save/ctx_restore implementation … [RFC] ipc: pm_state_set/get commands added Apr 26, 2019
Comment thread src/ipc/handler.c
case SOF_IPC_PM_STATE_SET:
return ipc_pm_state_set(header);
case SOF_IPC_PM_STATE_GET:
return ipc_pm_state_get(header);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lbetlej just for my understanding. When would the driver use the ipc_pm_state_get()? Clearly when the DSP is in D3, this cannot be used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063 I'm not sure, but with IPCs from #1339 it may be possible, they work in D3 afaik.
@lbetlej am I right?

@lgirdwood

Copy link
Copy Markdown
Member

@lbetlej btw, is there an equivalent kernel ABI update PR ?

@lgirdwood

Copy link
Copy Markdown
Member

@lbetlej CI failing due to conflicts. Will need kernel PR too.

@tlauda

tlauda commented Jul 6, 2019

Copy link
Copy Markdown
Contributor

@lbetlej What are we doing with this one?

@lgirdwood

Copy link
Copy Markdown
Member

@lbetlej I think we are good once conflicts/CI issues resolved and and kernel PR is done too..

@lbetlej lbetlej closed this Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI ABI change involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants